package rpg.core
{
	import rpg.role.Hero;

	public class RoleHardComponent extends AutoDestroyComponent
	{
		private var role : Hero;

		public function RoleHardComponent(type : * = null)
		{
			super(type == null ? RoleHardComponent : type);
		}

		override public function notifyAdded() : void
		{
			role = owner as Hero;
			role.isHardTime = true;
		}

		override public function timeOut() : void
		{
			role.isHardTime = false;
			super.timeOut();
		}

		override public function destroy() : void
		{
			super.destroy();
			role = null;
		}
	}
}